home *** CD-ROM | disk | FTP | other *** search
Wrap
;---------------------------------------------------------------------------- ; Installation script for AmiCAD ; ; $VER: AmiCAD-Install 1.3 (06.05.98) ; ; (C)1997-1998 R.Florac ;**************************************************************************** ; Creation of the AmiCAD drawer ********************************************* ;**************************************************************************** (set #AmiCADdestdir-help "A directory named AmiCAD will be created, if it doesn't allready exists, at the place you'll choose") (set #destination (expandpath (askdir (prompt "Where do you want to install the AmiCAD drawer?") (help #AmiCADdestdir-help) (default @default-dest) (disk) ) ) ) (set @default-dest (tackon #destination "AmiCAD")) (if (= 0 (askbool (prompt "Destination directory for AmiCAD\nwill be "@default-dest) (choices "Continue" "Stop") (help "If the specified directory doesn't agree, choose 'Stop': you'll have to restart this installer script and choose another directory for destination.") )) (exit (quiet)) ) (if (= (exists @default-dest (noreq)) 0) (makedir @default-dest (infos))) (makedir (tackon @default-dest "Library")) (makedir (tackon @default-dest "Sheets") (infos)) (makedir (tackon @default-dest "Clips")) (makedir (tackon @default-dest "ARexx")) (makedir (tackon @default-dest "ToolBars")) ;**************************************************************************** ; Copy of the AmiCAD files ************************************************** ;**************************************************************************** (copyfiles (source "") (dest @default-dest) (pattern "AmiCAD#?") (prompt "Choose the files you want to copy") (help (cat "Select the files you want to copy, only the marked files will be copied.\nAmiCAD is the program file.\nAmiCAD.keys is the file where you are stored the definitions of macros keys.\n" "AmiCAD.prefs is the file where are stored the preferences, don't copy it if you want to keep your old preferences.")) (confirm) (infos) ) (delete (tackon @default-dest "AmiCAD.prefs")) (copyfiles (source "prefs.english") (dest @default-dest) ) (rename (tackon @default-dest "prefs.english") (tackon @default-dest "AmiCAD.prefs")) ;**************************************************************************** ; Copy of the AmiCAD libraries (symbols files) ****************************** ;**************************************************************************** (copyfiles (source "Bibliothèques") (dest (tackon @default-dest "Library")) (pattern "#?") (prompt "Choose the symbols files to copy\nSome files has been updated.") (help "Select the files you want to copy, they are symbols files, AmiCAD use them to draw schematics.\nA new library has been created (opto-electronic), some others has been enhanced.") (confirm) (infos) ) ;**************************************************************************** ; Copy of the AmiCAD clips ************************************************** ;**************************************************************************** (copyfiles (source "Clips_english") (dest (tackon @default-dest "Clips")) (pattern "#?") (prompt "Choose the clip files to copy") (help "Select the files you want to copy, they are clip files, defined with AmiCAD.\nThey can be used to draw some current symbols not yet defined in the libraries.\nYou shall be able to define your own clips with AmiCAD.") (confirm) (infos) ) ;**************************************************************************** ; Copy of the AmiCAD ARexx scripts ****************************************** ;**************************************************************************** (copyfiles (source "ARexx") (dest (tackon @default-dest "ARexx")) (pattern "#?") (prompt "Choose the ARexx scripts you want to copy\nWARNING: all the scripts have been greatly enhanced, they are now localized.") (help "Select the files you want to copy.\nThe contents of this files are macro-commands, they can be used with AmiCAD.") (confirm) (infos) ) ;**************************************************************************** ; Copy of the AmiCAD sheet files ******************************************** ;**************************************************************************** (copyfiles (source "Schémas") (dest (tackon @default-dest "Sheets")) (pattern "#?") (prompt "Choose the sheets files you want to copy\n") (help "Select the files you want to copy, they are examples files obtained with AmiCAD.") (confirm) (infos) ) ;**************************************************************************** ; Setting the tooltypes of the AmiCAD icon ********************************** ;**************************************************************************** (tooltype (prompt "Setting AmiCAD LIBS Tooltypes") (dest (tackon @default-dest "AmiCAD")) (settooltype "LIBS" (tackon @default-dest "library")) ) (tooltype (prompt "Setting AmiCAD CLIPS Tooltype") (dest (tackon @default-dest "AmiCAD")) (settooltype "CLIPS" (tackon @default-dest "Clips")) ) (tooltype (prompt "Setting AmiCAD HELPFILE Tooltype") (dest (tackon @default-dest "AmiCAD")) (settooltype "HELPFILE" (tackon @default-dest "AmiCAD.guide")) ) (set msg_welcome "IF(OBJECTS(-1)==0,LOAD(\"Sheets/Logo\"),0):MESSAGE(\"Welcome with AmiCAD\"+CHR(10)+\"the electronics editor\"+CHR(10)+\"for Amiga computer.\")") (tooltype (prompt "Set AmiCAD Macro Tooltypes") (dest (tackon @default-dest "AmiCAD")) (settooltype "MACRO" msg_welcome) ) ;**************************************************************************** ; Copy of the AmiCAD.guide file ********************************************* ;**************************************************************************** (set catalogue 1) (if (= @language "français") (set catalogue 0)) (set catalogues (askchoice (prompt "Select the guide you want to install") (help "The english guide is not yet finished but it has been enhanced, all ARexx functions are now correctly descripted.") (choices "Français" "English") (default catalogue) ) ) (if (= catalogues 0) (copyfiles (prompt "Copying the french guide") (source ("docs/français")) (dest (@default-dest)) (all) ) ) (if (= catalogues 1) (copyfiles (prompt "Copying the english guide") (source ("docs/english")) (dest (@default-dest)) (all) ) ) ;**************************************************************************** ; Copy of the AmiCAD catalogs *********************************************** ;**************************************************************************** (set catalogue 32) (if (= @language "français") (set catalogue 1)) (if (= @language "deutsch") (set catalogue 2)) (if (= @language "ÃeÓtina") (set catalogue 4)) (if (= @language "español") (set catalogue 8)) (if (= @language "italiano") (set catalogue 16)) (if (= @language "slovensko") (set catalogue 64)) (if (= @language "Suomi") (set catalogue 128)) (if (= @language "Svenska") (set catalogue 256)) (set catalogues (askoptions (prompt "Select the catalog you want to install") (help "The catalog of your country is the one you have to copy.\nThe english catalogs are for library files.\nSome library catalogs have been written.\nMany catalogs have not been updated.") (choices "Français" "Deutsch" "Czech" "Español" "Italiano" "English" "Slovensko" "Suomi" "Svenska") (default catalogue) ) ) (if (= (BITAND catalogues 1) 1) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the french catalog") (source ("Catalogs/français")) (dest (tackon @default-dest "catalogs/français")) (all) ) ) ) (if (= (BITAND catalogues 2) 2) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the deutsch catalog") (source ("Catalogs/deutsch")) (dest (tackon @default-dest "catalogs/deutsch")) (all) ) ) ) (if (= (BITAND catalogues 4) 4) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the czech catalog") (source ("Catalogs/ÃeÓtina")) (dest (tackon @default-dest "catalogs/ÃeÓtina")) (all) ) ) ) (if (= (BITAND catalogues 8) 8) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the spanish catalog") (source ("Catalogs/español")) (dest (tackon @default-dest "catalogs/español")) (all) ) ) ) (if (= (BITAND catalogues 16) 16) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the italian catalogs") (source ("Catalogs/italiano")) (dest (tackon @default-dest "catalogs/italiano")) (all) ) ) ) (if (= (BITAND catalogues 32) 32) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the english catalogs") (source ("Catalogs/english")) (dest (tackon @default-dest "catalogs/english")) (all) ) ) ) (if (= (BITAND catalogues 64) 64) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the slovenian catalogs") (source ("Catalogs/slovensko")) (dest (tackon @default-dest "catalogs/slovensko")) (all) ) ) ) (if (= (BITAND catalogues 128) 128) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the Suomi catalogs") (source ("Catalogs/Suomi")) (dest (tackon @default-dest "catalogs/Suomi")) (all) ) ) ) (if (= (BITAND catalogues 256) 256) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the Svenska catalogs") (source ("Catalogs/Svenska")) (dest (tackon @default-dest "catalogs/Svenska")) (all) ) ) ) ;**************************************************************************** ; Copy of the catalogs sources ********************************************** ;**************************************************************************** (set catalogues (askbool (prompt "Do you want to copy the catalog sources files?") (help "The sources files of the catalog are only needed if you want to create a catalog file for a new country (not yet done).") (default 0) ) ) (if (= catalogues 1) ( (set sources (askoptions (prompt "Select the catalogs sources you want to install") (help "The sources files of the catalog are only needed if you want to create a catalog file for a new country (not yet done).") (choices "French" "Deutsch" "Czech" "Italiano" "english") (default catalogue) ) ) (if (= (BITAND sources 1) 1) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the french source catalog") (source ("Catalogs")) (pattern ("#?.(français.ct|cd)")) (dest (tackon @default-dest "catalogs")) (files) ) ) ) (if (= (BITAND sources 2) 2) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the deutsch source catalog") (source ("Catalogs")) (pattern ("#?.(deutsch.ct|cd)")) (dest (tackon @default-dest "catalogs")) (files) ) ) ) (if (= (BITAND sources 4) 4) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the czech source catalog") (source ("Catalogs")) (pattern ("#?.(ÃeÓtina.ct|cd)")) (dest (tackon @default-dest "catalogs")) (files) ) ) ) (if (= (BITAND sources 8) 8) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the italian source catalog") (source ("Catalogs")) (pattern ("#?.(italiano.ct|cd)")) (dest (tackon @default-dest "catalogs")) (files) ) ) ) (if (= (BITAND sources 16) 16) ( (makedir (tackon @default-dest "Catalogs")) (copyfiles (prompt "Copying the english source catalogs") (source ("Catalogs")) (pattern ("#?.(english.ct|cd)")) (dest (tackon @default-dest "catalogs")) (files) ) ) ) ) ) ;**************************************************************************** ; Copy of toolbars ********************************************************** ;**************************************************************************** (copyfiles (prompt "Copying toolbars") (source ("barres")) (dest (tackon @default-dest "ToolBars")) (all) ) (exit)